//============================================================================
// Copyright (C) 2003-2013 Brett R. Jones 
// All Rights Reserved
//
// You may redistribute and/or modify for non commercial and commercial uses 
// provided this copyright notice remains in place and is not modified
//
// This code is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
// brettjones1900@gmail.com
// http://www.p2panarchy.com
//============================================================================
#ifndef PKT_DEBUG_H
#define PKT_DEBUG_H

#define DBG_POS_INPUT_PAUSE				1
#define DBG_FAKE_KEY_PLAY_FILE			2
#define DBG_FAKE_KEY_PAUSE				3
#define DBG_CAP_ON_OFF					4
#define DBG_CAP_REPLAY_FILE				5
#define DBG_CAP_REPLAY_SPEED			6
#define DBG_CAP_REPLAY_PAUSE			7			
#define DBG_RESTART_POS					8			
#define DBG_REBOOT_POS					9			


#pragma pack(push) 
#pragma pack(1)
class PktDebug : public VxPktHdr
{
public:
	PktDebug()
	{
		m_u16PktType = PKT_TYPE_DEBUG;
		m_u16PktLen = sizeof( PktDebug );
		as8DbgParam[ 0 ] = 0;
		u32Param1 = 0;
		u32Param2 = 0;
		u32Param3 = 0;
//		memset( as8Res, 0, sizeof( as8Res ) );
		vx_assert( 0 == (m_u16PktLen & 0x0f ) );
	}
	void CalcPktLen( void )
	{
		//calculate length of packet from length of file data
		m_u16PktLen = (unsigned short)ROUND_TO_16BYTE_BOUNDRY( sizeof( PktDebug ) - MAX_DEBUG_PARAM_LEN  + strlen( as8DbgParam )+1 );
	}
	unsigned short u16DebugCmd;
	unsigned long u32Param1; // source of message
	unsigned long u32Param2; //
	unsigned long u32Param3; //
	char as8Res[8];
	char as8DbgParam[ MAX_DEBUG_PARAM_LEN + 4 ];  // force to 16byte boundary
};
#pragma pack(pop)


#endif //#ifndef PKT_DEBUG_H

